package swtElements;

import org.eclipse.swt.SWT;
import org.eclipse.swt.graphics.Color;
import org.eclipse.swt.graphics.Font;
import org.eclipse.swt.graphics.FontData;
import org.eclipse.swt.layout.GridData;
import org.eclipse.ui.forms.widgets.ExpandableComposite;
import org.eclipse.ui.forms.widgets.FormToolkit;
import org.eclipse.ui.forms.widgets.Section;

public class MainSection {
	
	Section section;
	
	public MainSection(FormToolkit toolkitEdit, Form formEdit){
		this.section =toolkitEdit.createSection(formEdit.getBody(),
				Section.TITLE_BAR | ExpandableComposite.COMPACT);
		FontData fontData = new FontData("Arial", 14, SWT.BOLD);
		Font font = new Font(formEdit.getDisplay(), fontData);
		
		section.setFont(font);
		section.setBackground(new Color(null, 239, 244, 251));
		section.setForeground(new Color(null, 13, 77, 163));
		section.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_FILL));
	}

	public void setText(String docText) {
		section.setText(docText);
	}

}
